/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cn.ekuma.epos.servings;

import cn.ekuma.data.dao.I_DataLogic;
import cn.ekuma.data.ui.swing.SwingEditorRecord;
import cn.ekuma.epos.datalogic.I_DataLogicSales;
import cn.ekuma.epos.panel.JPanelTableDAO;
import com.openbravo.bean.ServiceCalendar;
import com.openbravo.pos.base.AppLocal;
import com.openbravo.pos.model.AbstractPosSwingModel;
import com.openbravo.pos.model.BaseSwingModel;

import java.awt.Component;

/**
 *
 * @author Administrator
 */
public class JServiceCalendarPanel extends JPanelTableDAO<ServiceCalendar>  {
    private I_DataLogicSales m_dlSales;
    private JServiceCalendarEditor editor;

    @Override
    public Component getFilter() {
        return null;
    }

    @Override
    protected void init() {
        editor=new JServiceCalendarEditor(m_dlSales,dirty);
    }

    @Override
    public SwingEditorRecord getEditor() {
        return editor;
    }

    @Override
    public I_DataLogic getDataLogic() {
       return m_dlSales;
    }

    @Override
    public Class getSuportClass() {
        return ServiceCalendar.class;
    }

    @Override
    public String getObjectRenderString(ServiceCalendar obj) {
        return obj.getName();
    }

    public String getTitle() {
       return AppLocal.getIntString("Menu.ServiceCalendar");
    }

	@Override
	public String getModelName() {
		return BaseSwingModel.NAME;
	}

	@Override
	public void setModel(AbstractPosSwingModel mode) {
		m_dlSales = mode.getDLSales();
		
	}

}
